

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'lpapplicant-form',
	'enableAjaxValidation'=>true,
)); ?>

	<p class="note"><?php  echo Yii::t('application', 'Fields with <span class="required">*</span> are required.');?></p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'idlpapplicant'); ?>		
                <?php echo $form->textField($model,'idlpapplicant',array('size'=>8,'maxlength'=>8)); ?>
		<?php echo $form->error($model,'idlpapplicant'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'year'); ?>		
                <?php echo $form->textField($model,'year',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'year'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'idccward'); ?>		
                <?php echo $form->textField($model,'idccward',array('size'=>10,'maxlength'=>10,'ajax'=>array('type'=>'POST', 'dataType'=>'json', 'data'=>array('cid'=>'js:$(\'#Lpapplicant_idccward\').val()',), 'url'=>CController::createUrl('ccward/jsonmessage'), 'success'=>'function(data){$(\'#' . CHtml::activeId($model,'idccward') . '_msg\').text(data.message);}'))); ?>
                <span id="<?php echo CHtml::activeId($model,'idccward'); ?>_msg">
                    <?php echo !isset($model->idccward0->idcczone) || $model->isNewRecord ? "-" : $model->idccward0->idcczone; ?>
                </span>
                <?php
                    $imghtml = CHtml::image(Yii::app()->request->baseUrl . '/images/tooltip.png');
                    echo CHtml::link($imghtml, "", array(
                        'style' => 'cursor: pointer; text-decoration: underline;',
                        'onclick' => "{popupview('idccward', 'index.php?r=ccward/popupview'); }"));
                    ?>
		<?php echo $form->error($model,'idccward'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'idcczone'); ?>		
                <?php echo $form->textField($model,'idcczone',array('size'=>10,'maxlength'=>10,'ajax'=>array('type'=>'POST', 'dataType'=>'json', 'data'=>array('cid'=>'js:$(\'#Lpapplicant_idcczone\').val()',), 'url'=>CController::createUrl('cczone/jsonmessage'), 'success'=>'function(data){$(\'#' . CHtml::activeId($model,'idcczone') . '_msg\').text(data.message);}'))); ?>
                <span id="<?php echo CHtml::activeId($model,'idcczone'); ?>_msg">
                    <?php echo !isset($model->idcczone0->zonename) || $model->isNewRecord ? "-" : $model->idcczone0->zonename; ?>
                </span>
                <?php
                    $imghtml = CHtml::image(Yii::app()->request->baseUrl . '/images/tooltip.png');
                    echo CHtml::link($imghtml, "", array(
                        'style' => 'cursor: pointer; text-decoration: underline;',
                        'onclick' => "{popupview('idcczone', 'index.php?r=cczone/popupview'); }"));
                    ?>
		<?php echo $form->error($model,'idcczone'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'busname'); ?>		
                <?php echo $form->textField($model,'busname',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'busname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'address'); ?>		
                <?php echo $form->textField($model,'address',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'address'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'busplace'); ?>		
                <?php echo $form->textField($model,'busplace',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'busplace'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'idlpgroup'); ?>		
                <?php echo $form->textField($model,'idlpgroup',array('size'=>10,'maxlength'=>10,'ajax'=>array('type'=>'POST', 'dataType'=>'json', 'data'=>array('cid'=>'js:$(\'#Lpapplicant_idlpgroup\').val()',), 'url'=>CController::createUrl('lpgroup/jsonmessage'), 'success'=>'function(data){$(\'#' . CHtml::activeId($model,'idlpgroup') . '_msg\').text(data.message);}'))); ?>
                <span id="<?php echo CHtml::activeId($model,'idlpgroup'); ?>_msg">
                    <?php echo !isset($model->idlpgroup0->gnameen) || $model->isNewRecord ? "-" : $model->idlpgroup0->gnameen; ?>
                </span>
                <?php
                    $imghtml = CHtml::image(Yii::app()->request->baseUrl . '/images/tooltip.png');
                    echo CHtml::link($imghtml, "", array(
                        'style' => 'cursor: pointer; text-decoration: underline;',
                        'onclick' => "{popupview('idlpgroup', 'index.php?r=lpgroup/popupview'); }"));
                    ?>
		<?php echo $form->error($model,'idlpgroup'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'idlprelative'); ?>		
                <?php echo $form->textField($model,'idlprelative',array('size'=>10,'maxlength'=>10,'ajax'=>array('type'=>'POST', 'dataType'=>'json', 'data'=>array('cid'=>'js:$(\'#Lpapplicant_idlprelative\').val()',), 'url'=>CController::createUrl('lprelative/jsonmessage'), 'success'=>'function(data){$(\'#' . CHtml::activeId($model,'idlprelative') . '_msg\').text(data.message);}'))); ?>
                <span id="<?php echo CHtml::activeId($model,'idlprelative'); ?>_msg">
                    <?php echo !isset($model->idlprelative0->name) || $model->isNewRecord ? "-" : $model->idlprelative0->name; ?>
                </span>
                <?php
                    $imghtml = CHtml::image(Yii::app()->request->baseUrl . '/images/tooltip.png');
                    echo CHtml::link($imghtml, "", array(
                        'style' => 'cursor: pointer; text-decoration: underline;',
                        'onclick' => "{popupview('idlprelative', 'index.php?r=lprelative/popupview'); }"));
                    ?>
		<?php echo $form->error($model,'idlprelative'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'idlplicency'); ?>		
                <?php echo $form->textField($model,'idlplicency',array('size'=>8,'maxlength'=>8,'ajax'=>array('type'=>'POST', 'dataType'=>'json', 'data'=>array('cid'=>'js:$(\'#Lpapplicant_idlplicency\').val()',), 'url'=>CController::createUrl('lplicency/jsonmessage'), 'success'=>'function(data){$(\'#' . CHtml::activeId($model,'idlplicency') . '_msg\').text(data.message);}'))); ?>
                <span id="<?php echo CHtml::activeId($model,'idlplicency'); ?>_msg">
                    <?php echo !isset($model->idlplicency0->name) || $model->isNewRecord ? "-" : $model->idlplicency0->name; ?>
                </span>
                <?php
                    $imghtml = CHtml::image(Yii::app()->request->baseUrl . '/images/tooltip.png');
                    echo CHtml::link($imghtml, "", array(
                        'style' => 'cursor: pointer; text-decoration: underline;',
                        'onclick' => "{popupview('idlplicency', 'index.php?r=lplicency/popupview'); }"));
                    ?>
		<?php echo $form->error($model,'idlplicency'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'temployee'); ?>		
                <?php echo $form->textField($model,'temployee',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'temployee'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'idccsex'); ?>		
                <?php echo $form->textField($model,'idccsex',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'idccsex'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'young'); ?>		
                <?php echo $form->textField($model,'young',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'young'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'old'); ?>		
                <?php echo $form->textField($model,'old',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'old'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'idlpholiday'); ?>		
                <?php echo $form->textField($model,'idlpholiday',array('size'=>8,'maxlength'=>8,'ajax'=>array('type'=>'POST', 'dataType'=>'json', 'data'=>array('cid'=>'js:$(\'#Lpapplicant_idlpholiday\').val()',), 'url'=>CController::createUrl('lpholiday/jsonmessage'), 'success'=>'function(data){$(\'#' . CHtml::activeId($model,'idlpholiday') . '_msg\').text(data.message);}'))); ?>
                <span id="<?php echo CHtml::activeId($model,'idlpholiday'); ?>_msg">
                    <?php echo !isset($model->idlpholiday0->holiday1) || $model->isNewRecord ? "-" : $model->idlpholiday0->holiday1; ?>
                </span>
                <?php
                    $imghtml = CHtml::image(Yii::app()->request->baseUrl . '/images/tooltip.png');
                    echo CHtml::link($imghtml, "", array(
                        'style' => 'cursor: pointer; text-decoration: underline;',
                        'onclick' => "{popupview('idlpholiday', 'index.php?r=lpholiday/popupview'); }"));
                    ?>
		<?php echo $form->error($model,'idlpholiday'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'fee'); ?>		
                <?php echo $form->textField($model,'fee',array('size'=>15,'maxlength'=>15)); ?>
		<?php echo $form->error($model,'fee'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'propertyno'); ?>		
                <?php echo $form->textField($model,'propertyno',array('size'=>8,'maxlength'=>8)); ?>
		<?php echo $form->error($model,'propertyno'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'waterno'); ?>		
                <?php echo $form->textField($model,'waterno',array('size'=>8,'maxlength'=>8)); ?>
		<?php echo $form->error($model,'waterno'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'idccstatus'); ?>		
                <?php echo $form->textField($model,'idccstatus',array('size'=>10,'maxlength'=>10,'ajax'=>array('type'=>'POST', 'dataType'=>'json', 'data'=>array('cid'=>'js:$(\'#Lpapplicant_idccstatus\').val()',), 'url'=>CController::createUrl('ccstatus/jsonmessage'), 'success'=>'function(data){$(\'#' . CHtml::activeId($model,'idccstatus') . '_msg\').text(data.message);}'))); ?>
                <span id="<?php echo CHtml::activeId($model,'idccstatus'); ?>_msg">
                    <?php echo !isset($model->idccstatus0->statusname) || $model->isNewRecord ? "-" : $model->idccstatus0->statusname; ?>
                </span>
                <?php
                    $imghtml = CHtml::image(Yii::app()->request->baseUrl . '/images/tooltip.png');
                    echo CHtml::link($imghtml, "", array(
                        'style' => 'cursor: pointer; text-decoration: underline;',
                        'onclick' => "{popupview('idccstatus', 'index.php?r=ccstatus/popupview'); }"));
                    ?>
		<?php echo $form->error($model,'idccstatus'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? Yii::t('application', 'Create') : Yii::t('application', 'Save')); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->

<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(// the dialog
    'id' => 'dialog' . get_class($model) . '_idlplicency',
    'options' => array(
        'title' => Yii::t('application', 'Lplicencys'),
        'autoOpen' => false,
        'modal' => true,
        'width' => 550,
        'height' => 470,
    ),
));
?>
<div class="divforidlplicency"></div>
<?php $this->endWidget(); ?>
<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(// the dialog
    'id' => 'dialog' . get_class($model) . '_idccstatus',
    'options' => array(
        'title' => Yii::t('application', 'Ccstatuses'),
        'autoOpen' => false,
        'modal' => true,
        'width' => 550,
        'height' => 470,
    ),
));
?>
<div class="divforidccstatus"></div>
<?php $this->endWidget(); ?>
<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(// the dialog
    'id' => 'dialog' . get_class($model) . '_idccward',
    'options' => array(
        'title' => Yii::t('application', 'Ccwards'),
        'autoOpen' => false,
        'modal' => true,
        'width' => 550,
        'height' => 470,
    ),
));
?>
<div class="divforidccward"></div>
<?php $this->endWidget(); ?>
<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(// the dialog
    'id' => 'dialog' . get_class($model) . '_idcczone',
    'options' => array(
        'title' => Yii::t('application', 'Cczones'),
        'autoOpen' => false,
        'modal' => true,
        'width' => 550,
        'height' => 470,
    ),
));
?>
<div class="divforidcczone"></div>
<?php $this->endWidget(); ?>
<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(// the dialog
    'id' => 'dialog' . get_class($model) . '_idlpgroup',
    'options' => array(
        'title' => Yii::t('application', 'Lpgroups'),
        'autoOpen' => false,
        'modal' => true,
        'width' => 550,
        'height' => 470,
    ),
));
?>
<div class="divforidlpgroup"></div>
<?php $this->endWidget(); ?>
<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(// the dialog
    'id' => 'dialog' . get_class($model) . '_idlpholiday',
    'options' => array(
        'title' => Yii::t('application', 'Lpholidays'),
        'autoOpen' => false,
        'modal' => true,
        'width' => 550,
        'height' => 470,
    ),
));
?>
<div class="divforidlpholiday"></div>
<?php $this->endWidget(); ?>
<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(// the dialog
    'id' => 'dialog' . get_class($model) . '_idlprelative',
    'options' => array(
        'title' => Yii::t('application', 'Lprelatives'),
        'autoOpen' => false,
        'modal' => true,
        'width' => 550,
        'height' => 470,
    ),
));
?>
<div class="divforidlprelative"></div>
<?php $this->endWidget(); ?>

<script type="text/javascript">
    function popupview(id, url)
    {
        jQuery.ajax({'url':url,'data':'isAjaxRequest=1&id=<?php echo get_class($model);?>_' + id,'type':'post','dataType':'json','success':function(data)
            {
                $('#dialog<?php echo get_class($model);?>_' + id +' div.divfor' + id).html(data.div);
            } ,'cache':false});
        $('#dialog<?php echo get_class($model);?>_' + id).dialog('open');
        return false;
    }
</script>
